<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
     <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/HRTWEB/js/buyGift.js"></script>
<title>立即购买</title>
</head>
<body>
	<table style="background-color: cornsilk;width: 100%;height: 50%;">
		<c:forEach var="address" items="${addressList}">
												
	    <tr><td>确认收货地址</td><td>管理收货地址</td></tr>
	    <tr><td><input type="radio" id="isUse"  name="isUse" addressId="${address.id}"/>${address.province}</td><td><a href="<%=request.getContextPath()%>/HRTWEB/address/show.do?memberId=${hrtMember.id}" target="_blank">修改本地址</a></td></tr>
	    <tr><td><a href="<%=request.getContextPath()%>/HRTWEB/address/show.do?memberId=${hrtMember.id}" target="_blank">使用新地址</a></td></tr>
												
		</c:forEach>
	</table>
	<table style="background-color: cornsilk;width: 100%;height: 50%;">
	    <tr><td>确认订单信息</td></tr>
	    <tr><td>礼品</td><td>单价（元）</td><td>数量</td><td>优惠方式</td><td>小计（元）</td></tr>
	    <tr><td>${giftDetail.gdName}</td><td>${giftDetail.discount}</td><td>${detail.total}</td><td>${detail.summery}</td></tr>
	    
	</table>
	<form action="<%=request.getContextPath()%>/web/orderInfor/save.do" name="webOrderInfo" method="post">
		<!-- 订单基本信息 -->
		<input value="${hrtMember.id}" type="hidden" name="memberId" id="memberId"/><!-- 会员ID -->
		<input  type="hidden" name="summery" id="summery" value="${detail.summery}"/><!-- 订单金额 -->
		<input type="hidden"  name="postCode" id="postCode"/><!-- 邮政编码 -->
		<input type="hidden"  name="province" id="province"/><!-- 收货地址 -->
		<input value="${hrtMember.mbrName}" type="hidden"  name="memberName" id="memberName"/><!-- 会员名 -->
		<input  type="hidden"  name="receiver" id="receiver"/><!-- 收货人 -->
		
		设置密码锁：<input type="text"  name="OpenPassword" id="OpenPassword"/><br/><!-- 密码锁 -->
		备注：<input type="text"  name="note" id="note"/><br/><!-- 备注 -->
		<!-- 订单详细信息 -->
		
		<input value="${giftDetail.giftName}" type="hidden"  name="details[0].giftName" id="giftName"/><!-- 礼品名称 -->
		<input value="${giftDetail.giftId}" type="hidden"  name="details[0].giftId" id="giftId"/><!-- 礼品id -->
		<input value="${giftDetail.giftCode}" type="hidden"  name="details[0].giftCode" id="giftCode"/><!-- 礼品编号 -->
		<input value="${giftDetail.salePrice}" type="hidden"  name="details[0].salePrice" id="salePrice"/><!-- 礼品规格单价 -->
		<input value="${detail.total}" type="hidden"  name="details[0].total" id="total"/><!-- 礼品规格数量 -->
		<input value="${detail.summery}" type="hidden"  name="details[0].summery" id="summery"/><!-- 总价 -->
		<input value="${giftDetail.id}" type="hidden"  name="details[0].giftDetailId" id="giftDetailId"/><!-- 礼品规格id -->
		<button type="submit">提交订单</button>
	</form>
</body>
</html>